<template>
  <fieldset>
    <legend>插槽</legend>
    <header>
      <slot name="header"></slot>
    </header>
    <main>
      <slot name="main" :data2="arr2"></slot>
      <!-- <slot name="main"></slot>
            <slot :data="arr2"></slot> -->
    </main>
    <footer>
      <slot name="footer"></slot>
    </footer>
    <slot :data="arr"></slot>
  </fieldset>
</template>

<script>
export default {
  data() {
    return {
      arr: ["1", "2", "3"],
      arr2: ["吃", "玩", "乐"],
      msg: "hello",
    };
  },
};
</script>
